package cn.wolfcode.education.mapper;

import cn.wolfcode.education.domain.School;
import cn.wolfcode.education.domain.SchoolLinkman;
import cn.wolfcode.education.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SchoolLinkmanMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SchoolLinkman record);

    SchoolLinkman selectByPrimaryKey(Long id);

    List<SchoolLinkman> selectAll();

    int updateByPrimaryKey(SchoolLinkman record);

    int queryForCount(QueryObject qo);

    List<School> queryForList(QueryObject qo);

    //联系人是否是主联系人
    void updateLinkmanMain(@Param("id") Long id, @Param("main") boolean main);

    void updateLinkmanMainFalseById(@Param("id") Long id, @Param("main") boolean main);

    void insertLinkmanName(SchoolLinkman man);

    void updateRelationWithSchool(@Param("linkmanId") Long linkmanId , @Param("schoolId") Long schoolId);

    List<SchoolLinkman> getLinkmanBySchoolId(Long schoolId);
}